'use strict';
function rank_by_two_large_one_small(collection){
  let t=parseInt(collection.length/3);
  let g=0;
  function sortNumber(a,b)
  {
    return a-b;
  }
  collection.sort(sortNumber);
  for(let i=0;i<t;i++)
    {
      collection.splice(g+3,0,collection[g])
      collection.splice(g,1)
      g+=3;
    }
  return collection;
}
module.exports = rank_by_two_large_one_small;
